import request from "@/utils/request";

/**查询会员详情 */
export function getInfo(params) {
  return request({
    url: "/admin/rule/getInfo",
    method: "get",
    params,
  });
}

/**查询推荐人 */
export function getReferrer(params) {
  return request({
    url: "/admin/rule/getReferrer",
    method: "get",
    params,
  });
}

/**修改推荐人 */
export function putReferrer(data) {
  return request({
    url: "/admin/rule/putReferrer",
    method: "put",
    data,
  });
}

/**查询用户绑定关系变动列表 */
export function changeList(params) {
  return request({
    url: "/system/change/list",
    method: "get",
    params,
  });
}

/**充余额 */
export function modifyBalance(data) {
  return request({
    url: "/admin/rule/modifyBalance",
    method: "put",
    data,
  });
}

/**充积分 */
export function modifyIntegral(data) {
  return request({
    url: "/admin/rule/modifyIntegral",
    method: "put",
    data,
  });
}

/**重置支付密码 */
export function putPaymentCode(data) {
  return request({
    url: `/admin/rule/putPaymentCode?userId=${data.userId}`,
    method: "put",
  });
}

/**修改会员等级 */
export function changeMembershipLevel(data) {
  return request({
    url: "/admin/rule/changeMembershipLevel",
    method: "put",
    data,
  });
}
